package cn.exrick.xboot.modules.your.graphics;
import cn.exrick.xboot.XbootApplication;
import cn.exrick.xboot.modules.graphics.entity.GraphicsContainer;
import cn.exrick.xboot.modules.graphics.service.IGraphicsContainerService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: njp
 * @Date: 2020/08/07/15:28
 * @Description:
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = XbootApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class OrgTest {
    @Autowired
    private IGraphicsContainerService iGraphicsContainerService;
    @Test
    public void getGraphicsContainerListByGraphicsId(){
        List<GraphicsContainer> graphicsContainerListByGraphicsId =iGraphicsContainerService.getGraphicsContainerListByGraphicsId("11");
        System.out.println("20200908测试："+graphicsContainerListByGraphicsId.toString());
    }
  /*  @Autowired
    private ISysOrgService iSysOrgService;
   private  SysOrgParam sysOrgParam = new SysOrgParam();
    @Test
    public   void  test(){
        Page page = new Page();
        page.setCurrent(1);
        page.setSize(10);

        SysOrgParam sysOrgParam = new SysOrgParam();
        List<String> dataScope=new ArrayList<>();
        //dataScope.add(1265476890651701250L);
        dataScope.add("1265476890672672771");
        sysOrgParam.setDataScope(dataScope);
        IPage<SysOrg> page1 = iSysOrgService.page(page, sysOrgParam);
        System.out.println(page1.getRecords().toString());
    }

   @Test
   public   void  list (){
       System.out.println("@@@test");
       List<String> dataScope=new ArrayList<>();
       dataScope.add("1265476890672672771");
       sysOrgParam.setDataScope(dataScope);
       List<SysOrg> list = iSysOrgService.list(sysOrgParam);
       System.out.println(list.toString());
   }
   @Test
   public  void add(){
       System.out.println("@@@test:"+"add");
       sysOrgParam.setId("1292759167794159617");
       sysOrgParam.setName("test");
       sysOrgParam.setCode("test");
       sysOrgParam.setPid("1265476890651701250");
       sysOrgParam.setSort(100);
       List<String> dataScope=new ArrayList<>();
       dataScope.add("1265476890651701250");
       sysOrgParam.setDataScope(dataScope);
       iSysOrgService.add(sysOrgParam);
   }
   @Test
   public   void delete(){
       sysOrgParam.setId("1265476890672672733");

       List<String> dataScope=new ArrayList<>();
       dataScope.add("1265476890672672733");
       sysOrgParam.setDataScope(dataScope);

       iSysOrgService.delete(sysOrgParam);
   }
   @Test
   public void edit(){
       System.out.println("@@@test:"+"edit");
       sysOrgParam.setId("1265476890672672771");
       sysOrgParam.setName("研发部");
       sysOrgParam.setCode("hxjt_bj_yfb");
       sysOrgParam.setPid("1265476890672672769");
       sysOrgParam.setSort(100);
       sysOrgParam.setRemark("华夏集团北京分公司研发部..");
       List<String> dataScope=new ArrayList<>();
       dataScope.add("1265476890672672771");
       sysOrgParam.setDataScope(dataScope);
       iSysOrgService.edit(sysOrgParam);
   }

   @Test
   public void detail(){
       sysOrgParam.setId("1265476890672672771");
       SysOrg detail = iSysOrgService.detail(sysOrgParam);
       System.out.println("@@@查看："+detail.toString());
   }*/

}
